//
//  UIFont+JFScale.m
//  JFBase
//
//  Created by Alan Wang on 2019/3/8.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#import "UIFont+JFScale.h"
#import "JFBase.h"

@implementation UIFont (JFScale)
+ (UIFont *)fontOfScaleSize:(CGFloat)fontSize{
    NSInteger font = [JFInternationalHelper getFontScaleCoefficient];
    float x = 0.1 * (font - 3) + 1;
    return [UIFont systemFontOfSize:fontSize*x];
}
+ (UIFont *)boldFontOfScaleSize:(CGFloat)fontSize{
    NSInteger font = [JFInternationalHelper getFontScaleCoefficient];
    float x = 0.1 * (font - 3) + 1;
    return [UIFont boldSystemFontOfSize:fontSize*x];
}
+ (nullable UIFont *)fontOfScaleSizeWithName:(NSString *)fontName size:(CGFloat)fontSize{
    NSInteger font = [JFInternationalHelper getFontScaleCoefficient];
    float x = 0.1 * (font - 3) + 1;
    return [UIFont fontWithName:fontName size:fontSize*x];
}
@end
